#include <stdio.h>
#include <stdlib.h>
#include <direct.h>
#include "CFM_Lib.h"
#include "HF_Lib.h"

int main4 ( int argc, char *argv[] )
{
    char command[80];
    char* dbname;

	HF_Init();

	if ( argc != 2 )
	{
        printf ( "Usage: %s dbname \n", argv[0] );
        return(1);
    }
   
    dbname = argv[1];
    sprintf ( command,"mkdir %s", dbname );
    system ( command);
   
    if ( _chdir ( dbname ) )
	{
        printf("Database creation failed");
        return(2);
    }

    /* Δημιουργία των πινάκων relCat και attrCat με χρήση των
        συναρτήσεων ΗF_CreateFile */

	if ( ( UTE_errno = CFM_Create() ) < 0 )
	{
		return  UTE_errno;
	}

    return 0;
}


